1. Field of the Invention
The present invention relates to a memory device for writing data to and erasing data from an each individual block, and in particular, to a memory device having a stored data protection function for inhibiting the writing and the erasing of data in an each block and a protection release function for releasing the writing and erasing inhibition.
2. Related Arts
Well known as a memory device for writing data to and erasing data from an each individual block is a flash memory which uses a nonvolatile memory cell. A stored data protection function for inhibiting the writing and the erasing of data is provided for the flash memory in order to prevent the writing and the erasing of data due to an erroneous operation. For example, regarding a memory block corresponding to a boot area, in which is stored an initial program-loading program which is to be read upon the activation of a computer, it is so set in advance that it inhibits the writing and the erasing of data, whereby during a normal operation other data are not written to the memory block, or data stored therein are not erased erroneously. It should be noted that since in the initial state, or in another specific situation, the writing or the erasing of data may be required for a memory block, a function for releasing the data protection function is also provided for the flash memory.
FIG. 10 is a table for explaining a conventional data protection release function. A conventional memory device comprises a protection designation storage unit for storing protection designation data used to inhibit the writing and the erasing of data in individual blocks, and a protection release signal for releasing the protection. In the normal state, the protection release signal is in the unreleased state in order to validate the protection designation data. As is shown in cases 1 and 2 in FIG. 10, in accordance with a protection designation signal read from the protection designation storage unit, a protection signal for inhibiting the writing and the erasing of data in a writing/erasing circuit is adjusted to the unprotected state or to the protected state. On the other hand, as is shown in cases 3 and 4 in FIG. 10, in the protection released state, the protection signal is set to the unprotected state, regardless of the state of the protection designation signal read from the protection designation storage unit, and the writing and the erasing of data is permitted.
When the above memory device is to write or to erase data relative to a memory block for which protection is designated, protection designation data are simply disregarded by a protection release signal. Therefore, data in the protection designation storage unit need not be changed, so that as a result the memory device can flexibly cope with various writing/erasing processes, such as a process for writing/erasing data in a specific memory block, and the overall alteration of data.
However, according to the conventional memory device, when the protection released state is set by a protection release signal, the writing or the erasing of data may be erroneously performed for a memory block containing data which should not be changed. That is, since only a simple function is employed for the memory device, i.e., a temporary protection release function for disregarding protection designation data in accordance with a protection release signal, data in a memory block having a high protection priority could easily be changed by the temporary protection release function. Therefore, data for which high security should be provided, such as a boot program in a boot memory area, may be erroneously changed or erased, which is not a preferable situation.